package com.anlogic.sdk.ui.tests.uc2.projectcreate;

import static org.junit.Assert.*;

import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.anlogic.sdk.ui.tests.utils.SF1Utils;
import com.anlogic.sdk.ui.tests.utils.SoftcoreUtils;
import com.anlogic.sdk.ui.tests.utils.WorkspaceUtils;

public class Softcoredemo_flashTest {

	private static SWTWorkbenchBot bot;
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		bot = new SWTWorkbenchBot();
		SWTBotPreferences.TIMEOUT = 10000;
		SWTBotPreferences.PLAYBACK_DELAY = 0;
		bot.waitUntil(Conditions.shellIsActive("data - FutureDynasty"), 60 * 1000*5);
	}

	

	@Before
	public void setUp() throws Exception {
		WorkspaceUtils.resetworkbench(bot);
	}

	@After
	public void tearDown() throws Exception {
		WorkspaceUtils.cleanWorkspace();
	}
	


	

	
	@Test
	public void CoresizeLight_OptimizationO0Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Light (ARCH=rv32i,ABI=ilp32)","None(-O0)");
	}
	@Test
	public void CoresizeLight_OptimizationO1Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Light (ARCH=rv32i,ABI=ilp32)","Optimize(-O1)");
	}
	@Test
	public void CoresizeLight_OptimizationO2Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Light (ARCH=rv32i,ABI=ilp32)","Optimize more(-O2)");
	}
	@Test
	public void CoresizeLight_OptimizationO3Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Light (ARCH=rv32i,ABI=ilp32)","Optimize most(-O3)");
	}
	@Test
	public void CoresizeLight_OptimizationOgTest() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Light (ARCH=rv32i,ABI=ilp32)","Optimize for debug(-Og)");
	}
	
	@Test
	public void CoresizeLight_OptimizationOsTest() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Light (ARCH=rv32i,ABI=ilp32)","Optimize size(-Os)");
	}
	
	
	
	@Test
	public void CoresizeMedium_OptimizationO0Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Medium (ARCH=rv32imac,ABI=ilp32)","None(-O0)");
	}
	@Test
	public void CoresizeMedium_OptimizationO1Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Medium (ARCH=rv32imac,ABI=ilp32)","Optimize(-O1)");
	}
	@Test
	public void CoresizeMedium_OptimizationO2Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Medium (ARCH=rv32imac,ABI=ilp32)","Optimize more(-O2)");
	}
	@Test
	public void CoresizeMedium_OptimizationO3Test() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Medium (ARCH=rv32imac,ABI=ilp32)","Optimize most(-O3)");
	}
	@Test
	public void CoresizeMedium_OptimizationOgTest() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Medium (ARCH=rv32imac,ABI=ilp32)","Optimize for debug(-Og)");
	}
	
	@Test
	public void CoresizeMedium_OptimizationOsTest() throws Exception{
		SoftcoreUtils.softcore(bot,"demo_flash","Medium (ARCH=rv32imac,ABI=ilp32)","Optimize size(-Os)");
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

}
